package com.gzyj.flink.gps.addtionalfnfo.enums;

import lombok.Getter;

/**
 * @author lhj
 */

@Getter
public enum JT808_Addtional_Position {
    无特定位置(0x00,"无特定位置"),
    圆形区域(0x01,"圆形区域"),
    矩形区域(0x02,"矩形区域"),
    多边形区域(0x03,"多边形区域"),
    路段(0x4,"路段"),
    ;
    private int code;
    private String name;

    JT808_Addtional_Position(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static JT808_Addtional_Position find(int code){

        for (JT808_Addtional_Position position:JT808_Addtional_Position.values()){
            if(position.getCode()==code){
                return position;
            }
        }
        return null;

    }
}
